input_file = 'heros_name.txt'
output_file = 'splite_hers_names.txt'

with open(input_file, 'r', encoding='utf-8') as fin, open(output_file, 'w', encoding='utf-8') as fout:
    for line in fin:
        line = line.strip()
        if line:  # 忽略空行
            for key in ['Q', 'W', 'E', 'R', 'Y', 'S', 'X', 'D']:
                fout.write(f'{line}_{key}\n')
